//
//  MapViewController.m
//  JZMCFM
//
//  Created by Mc on 15/11/9.
//  Copyright (c) 2015年 陈卓. All rights reserved.
//

#import "MapViewController.h"
#import <MAMapKit/MAMapKit.h>
@interface MapViewController ()<MAMapViewDelegate>
@property(nonatomic,strong)MAMapView *mapView;
@end

@implementation MapViewController

- (void)viewDidLoad {
    [super viewDidLoad];
     [MAMapServices sharedServices].apiKey = @"01c846907929fed74fffc1cd447fc3ea";
    _mapView = [[MAMapView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(self.view.frame), CGRectGetHeight(self.view.frame))];
    _mapView.showsUserLocation = YES;
    _mapView.userTrackingMode = 1;
//    _mapView.delegate = self;
    
    [self.view addSubview:_mapView];
}
#pragma mark - 地图
- (void)createMapView
{
    _mapView = [[MAMapView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(self.view.bounds), CGRectGetHeight(self.view.bounds))];
    _mapView.delegate = self;
    [self.view addSubview:_mapView];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
